package com.hejjon.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hejjon.core.domain.entity.FeatureField;
import com.hejjon.domain.request.FeatureFieldBatchSaveRequest;
import com.hejjon.domain.request.FeatureFieldCreateRequest;
import com.hejjon.domain.response.FeatureFieldBatchSaveResponse;
import com.hejjon.domain.response.FeatureFieldCreateResponse;
import com.hejjon.domain.vo.FeatureFieldVO;

import java.util.List;

/**
 * @author: cs
 * @date: 2025-05-15 14:02:15
 * @since: 1.0
 */
public interface IFeatureFieldService extends IService<FeatureField> {

    /**
     *
     * @param request
     * @return
     */
    FeatureFieldCreateResponse create(FeatureFieldCreateRequest request);

    /**
     *
     * @param name
     * @param featureId
     * @return
     */
    boolean existByNameAndFeatureId(String name, String featureId);


    /**
     * 根据业务对象ID删除字段
     * @param featureId 业务对象ID
     * @return
     */
    boolean removeByFeatureId(String featureId);


    /**
     *
     * @param request
     * @return
     */
    FeatureFieldBatchSaveResponse batchSave(FeatureFieldBatchSaveRequest request);

    /**
     * 根据业务特征ID查询字段列表
     * @param featureId
     * @return
     */
    List<FeatureFieldVO> findByFeatureId(String featureId);


    /**
     * 逻辑删除字段
     */
    boolean removeByFieldId(String fieldId, String deleteFlag);

    /**
     * 批量删除
     */
    boolean batchRemoveByFieldId(List<String> fieldIds, String deleteFlag);

}
